FROM docker.io/openanolis/anolisos:8.6

LABEL \
        org.opencontainers.image.title="memtier_benchmark_keentune" \
        org.opencontainers.image.version="v1.0-8.6" \
        maintainer="OpenAnolis KeenTune SIG"

COPY redis_get.sh redis_get.sh
COPY redis_set.sh redis_set.sh
COPY redis_set_get.sh redis_set_get.sh
COPY redis_get_pipeline.sh redis_get_pipeline.sh
COPY redis_set_pipeline.sh redis_set_pipeline.sh
COPY redis_set_get_pipeline.sh redis_set_get_pipeline.sh


RUN yum install autoconf automake make gcc-c++ git numactl pcre-devel zlib-devel libmemcached-devel openssl-devel libevent-devel -y

RUN for i in {1..5}; do rm -rf memtier_benchmark; git clone https://github.com/RedisLabs/memtier_benchmark.git;if [ $? -eq 0 ];then break;fi; done \
    && cd memtier_benchmark \
    && autoreconf -ivf \
    && ./configure \
    && make \
    && make install \
    && rm -rf ../memtier_benchmark
